WRITE LONG

This command will write a long word of data to the file from an integer value.

  Syntax
WRITE LONG File Number, Variable
  Parameters
File Number
Integer
The file specified by the file number must be open or the command will fail
Variable
Integer
This command will write a long word of data to the file from an integer value. A long word represents four bytes (DWORD)

  Returns

This command does not return a value.

  Description

A long word represents four bytes. The file specified by the file number must be open or the command will fail.

  Example Code
cls
a as DWORD
open to write 1,"data.dat"
if file open(1)=1
write long 1,42
endif
close file 1
wait 1000*8
open to read 1,"data.dat"
if file open(1)=1
read long 1,a
print "value= "+str(a)
endif
close file 1
do
loop
end
  See also

FILE Commands Menu
Index